<!DOCTYPE html>
<html>
    <head>
        <title>360湘江世纪城</title>
        <#include "controls/public_header.ftl">
		<script type="text/javascript" src="${model._contextPath}/web/resources/lib/utils/UUID.js"></script>
		<script type="text/javascript" src="${model._contextPath}/web/resources/lib/utils/ajaxutil.js"></script>
        <script type="text/javascript" src="${model._contextPath}/web/resources/js/confirm_order.js"></script>
        <script type="text/javascript">
		$(function(){
			PubOPT.jsEventLoad(pageJsEvent);
		});
		
		function pageJsEvent() {
			$('#categorys').hover(function(){
				$(this).children('.mc').toggle();
			});
			$(".item").hover(function(){
				$(this).toggleClass('hover');
			});
		}
		</script>
		<style>
		.e_wb{font-size:12px; font-weight:normal;}
		</style>
    </head>
    <body>
		<div id="container">
			<#include "controls/header.ftl">
			<div id="main">
				<!-- 导航-->
				<div class="Lay_1" style="height:32px">
					<div class="col_2" id="categorys">
						<div class="title_1">全部商品分类</div>
						<div class="mc">
							<#include "controls/categories.ftl">
						</div>
					</div>
					<div class="col_3">
						<#include "controls/top_nav.ftl">
					</div>
				</div>
				<!-- 结算界面-->
				<div class="Lay_10">
					<div class="bt">确认收货地址</div>
					<div class="nr">
						<#if model.addresses?exists && model.addresses?has_content && (model.addresses?size>0) >
							<#list model.addresses as address>
								<div id="dz_${address.addr_id}" class="tt1"><span>
								<table id="tdz_${address.addr_id}" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
									<tr>
										<td width="24" align="center" valign="middle">&nbsp;</td>
										<td width="55" align="left" valign="middle" class="span">&nbsp;</td>
										<td width="535" align="left" valign="middle">
											<a href="javascript:selectRadio('${address.addr_id}')">
												<input name="address" type="radio" value="${address.addr_id}" <#if (address_index==0)> checked </#if>/> 
												<font id="${address.addr_id}_address">${address.address}</font> 
												(<font id="${address.addr_id}_people">${address.people}</font>) 
												<font id="${address.addr_id}_tel">${address.tel}</font>
											</a>
									 	</td>
										<td width="326" align="right" valign="middle" class="span1">
											<font id="dz_state_${address.addr_id}" code="${address.def}"></font>
											<font id="btn_edit_${address.addr_id}">&nbsp;&nbsp;&nbsp;[ <a href="javascript:editAddress('${address.addr_id}')">修改本地址</a> ]</font>
											<font id="btn_del_${address.addr_id}">&nbsp;&nbsp;&nbsp;[ <a href="javascript:delAddress('${address.addr_id}')">删除</a> ]</font>
										</td>
									</tr>
								</table>
								</span></div>
							</#list>
						</#if>
						<div id="add_address" style="display:none;" class="tt2"><span>
							<table id="edit_dz" class="box" style="display:none;" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
								<tr>
									<td width="129" height="50" align="right" valign="middle" class="boxbt">地址：</td>
									<td width="*" align="left" valign="middle"><input id="address" style="width:600px" type="text" class="boxwby"/></td>
								</tr>
								<tr>
									<td align="right" valign="middle">收货人：</td>
									<td align="left" valign="middle"><input id="people" type="text" class="boxwby"/></td>
								</tr>
								<tr>
									<td align="right" valign="middle">联系电话：</td>
									<td align="left" valign="middle"><input id="tel" type="text" class="boxwby"/></td>
								</tr>
								<tr>
				                  <td height="50" align="right" valign="middle">&nbsp;</td>
				                  <td height="50" align="left" valign="middle"><img src="${model._contextPath}/web/resources/images/anniu1.jpg" style="cursor:pointer" onclick="saveAddress()" width="100" height="25">&nbsp;&nbsp;&nbsp;&nbsp;<img src="${model._contextPath}/web/resources/images/anniu2.jpg" style="cursor:pointer" onclick="editCancel()" width="60" height="25"></td>
				                </tr>
							</table>
						</span></div>
						<div id="other_address" class="tt1">
							<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
								<tr>
									<td width="24" align="center" valign="middle">&nbsp;</td>
									<td width="55" align="left" valign="middle" class="span">&nbsp;</td>
									<td align="left" valign="middle" class="span1" style=" float:left"><a href="javascript:addAddress()">使用其它地址</a></td>
								</tr>
							</table>
						</div>
					</div>
					<div class="bt">确认订单信息</div>
					<div class="nr">
						<#assign total=0 />
						<#if model.shops?exists && model.shops?has_content && (model.shops?size>0) >
							<#list model.shops as shop>
								<#assign total=total+(shop.total?number) />
								<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="boxbox">
									<tr>
										<td height="35" colspan="2" align="center" valign="middle" class="xt">店铺宝贝</td>
										<td width="11%" align="center" valign="middle" class="xt">给买家留言</td>
										<td width="12%" align="center" valign="middle" class="xt">单价</td>
										<td width="12%" align="center" valign="middle" class="xt">数量</td>
										<td width="12%" align="center" valign="middle" class="xt">小计</td>
									</tr>
									<tr>
										<td height="40" colspan="6" align="center" valign="middle" class="nrbt2">
											<table width="96%" border="0" align="center" cellspacing="0">
												<tr>
													<td width="30%" align="left" valign="middle" class="text7">店辅：<span class="text10"><a href="${model._contextPath}/p100009.html?id=${shop.shop_id}" target="_blank">${shop.shop_name}</a></span></td>
													<td width="30%" align="left" valign="middle"><span class="text7">卖家：</span><span class="text10">${shop.username}</span></td>
													<td width="40%" align="right" valign="middle">店辅总计：<span class="text8"><strong>￥${shop.total?number?string("0.##")}</strong></span></td>
												</tr>
											</table>
										</td>
									</tr>
									<#list model.goodses as goods>
										<#if (goods.shop_id == shop.shop_id)>
										<tr>
											<td width="8%" height="70" align="center" valign="middle" class="nrbt3"><a href="${model._contextPath}/p100010.html?id=${goods.goods_id}" target="_blank"><img src="${model._contextPath}${goods.small_relative_path}" width="50" height="50" class="box"></a></td>
											<td width="36%" align="left" valign="middle" class="text10 nrbt3"> <a href="${model._contextPath}/p100010.html?id=${goods.goods_id}" target="_blank">${goods.goods_name}</a>  </td>
											<td align="center" valign="middle" class="nrbt3"><textarea id="goods_msg_${goods.goods_id}" code="${goods.goods_id}" style="width:220px; height:45px; border:1px solid #cccccc; font-size:12px"></textarea></td>
											<td align="center" valign="middle" class="nrbt3">￥${goods.goods_price?number?string("0.##")}</td>
											<td align="center" valign="middle" class="nrbt3">${goods.num}</td>
											<td align="center" valign="middle" class="text8"><strong>${goods.subtotal?number?string("0.##")}</strong></td>
										</tr>
										</#if>
									</#list>
									<tr>
										<td height="54" colspan="6" align="center" valign="middle" class="nrbt">
											<table width="96%" border="0" align="center" cellspacing="0">
												<tr>
													<td width="3%" align="left" valign="middle">&nbsp;</td>
													<td width="64%" align="left" valign="middle" class="text7">&nbsp;</td>
													<td width="33%" align="left" valign="middle"><strong>店铺总计（含运费）：<span class="text8a">￥${shop.total?number?string("0.##")}</span></strong></td>
												</tr>
									  		</table>
										</td>
									</tr>
								</table>
							</#list>
						</#if>
						<table width="100%" height="60" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td height="54" colspan="6" align="right" valign="bottom">
									<table border="0" cellpadding="0" cellspacing="3" class="nrdzbox">
										<tr>
											<td align="right" valign="middle" bgcolor="#FFFFFF">实付款： <span class="text8aa"><strong>￥${total?string("0.##")}</strong></span>&nbsp;&nbsp;&nbsp;<br />
												派送至：<span id="txtAddress"></span><br />
												收货人：<span id="txtPeople"></span>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
								<td align="right" valign="top"><img id="account" style="cursor:pointer" src="${model._contextPath}/web/resources/images/tjan.jpg" alt="提交订单" width="135" height="36"></td>
							</tr>
						</table>
					</div>
				</div>
			</div>
			<div width="100%" height="127"> 
				<#include "controls/footer.ftl">
			</div>
		</div>
    </body>
</html>